package Homework03;

public class CallPackage extends AbstractPackage implements CallService{
    private int callTime;
    private int numOfMessage;

    public CallPackage() {
    }

    public CallPackage(int callTime,int  numOfMessage ,int price ) {
        this.callTime = callTime;
        this.numOfMessage=numOfMessage;
        this.price=price;
    }

    public int getCallTime() {
        return callTime;
    }

    public void setCallTime(int callTime) {
        this.callTime = callTime;
    }

    public int getNumOfMessage() {
        return numOfMessage;
    }

    public void setNumOfMessage(int numOfMessage) {
        this.numOfMessage = numOfMessage;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }
    @Override
    public void show(){
        System.out.println("套餐包含通话时间："+callTime);
        System.out.println("套餐包含短信条数："+numOfMessage);
        System.out.println("套餐价格："+price);

    }

    @Override
    public void showInfo(int time, SIMCard card) {
        System.out.println("用户"+card.getID()+"通话时长为："+callTime);
    }
}



